<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>优永动助手 - 首页</title>
    <link rel="stylesheet" href="/layui/css/layui.css" media="all">
    <link rel="stylesheet" href="https://cdn.staticfile.org/font-awesome/4.7.0/css/font-awesome.css">
    <script src="https://cdn.staticfile.org/jquery/1.10.2/jquery.min.js"></script>
    <script type="text/javascript" src="/layui/layui.all.js"></script>
    <link rel="stylesheet" href="/css/index.css">

</head>
<body>

<div class="lay-row">
    <div class="layui-carousel" id="test1" lay-filter="test1">
        <div carousel-item="">
            <div th:each="lunbo:${lunbotuDOS}">
                <img src="/images/1.png" th:src="${lunbo.imageurl}" width="100%">
            </div>
        </div>
    </div>
</div>

<div class="lay-row notice-top" onclick="openBolg()">
    <div class="layui-col-xs1 layui-col-xs-offset1"><i class="layui-icon layui-icon-speaker n-icon"></i></div>
    <div class="layui-col-xs8 shouquantip">火币api授权流程</div>
    <div class="layui-col-xs1"><i class="layui-icon layui-icon-praise n-icon"></i></div>
</div>


<div class="lay-row bizhong-box-main">
    <div class="layui-col-xs4 bizhong-box" th:each="bizhongDO:${bizhongDOS}">
        <div class="bizhong-name" th:text="${bizhongDO.getUpname()}">BTC/USDT</div>
        <div class="nowprice" th:text="${bizhongDO.getnowpricevo()}">37684.74</div>
        <div class="zhangfu" th:class="${bizhongDO.zhangfu}<0?'zhangfu zhangfu-fu':'zhangfu'"
             th:text="${bizhongDO.getzhangfuvo()}">2.28%
        </div>
    </div>

</div>

<div class="layui-row line-bold"></div>


<div class="layui-row img2-main">

    <div class="layui-col-xs6 img-btn-box" onclick="openpersoninfo()">
        <img src="/images/apiicon.png" th:src="${indexleft.address}" class="indeximg" width="100%">
    </div>

    <div class="layui-col-xs6 img-btn-box" onclick="openezhangdan()">
        <img src="/images/ezhangdan.png" th:src="${indexright.address}" class="indeximg" width="100%">
    </div>

</div>


<div class="layui-row">
    <div class="layui-tab" lay-filter="docDemoTabBrief">
        <ul class="layui-tab-title">
            <li class="layui-this layui-col-xs4 card-li">火币</li>

        </ul>
        <div class="layui-tab-content">
            <div class="layui-tab-item layui-show">

                <div class="layui-row box-item" th:each="jiaoyi:${openlist}"
                     th:onclick="'javascript:toJiaoyiPage(\''+${jiaoyi.id}+'\');'">
                    <div>
                        <input type="hidden" class="item-check-box" th:value="${jiaoyi.id}">
                    </div>
                    <div class="layui-col-xs5">
                        <div class="layui-row bizong-name-box" th:text="${jiaoyi.getUpname()}">TRX/USDT</div>
                        <div class="layui-row bizong-shuliang"
                             th:text="'数量:'+${jiaoyi.getchicangshuliangvo()}">数量：378.012589
                        </div>
                    </div>

                    <div class="layui-col-xs3">
                        <div class="layui-row">
                            <div class="celue layui-col-xs8" th:text="${jiaoyi.xunhuantype}==0?'单次循环':'策略循环'"></div>
                        </div>
                        <div class="layui-row fukui">浮亏:<span class="fu-fukui"
                                                              th:class="${jiaoyi.fukui}>0?'':'fu-fukui'"
                                                              th:text="${jiaoyi.getFukuiStr()}">+0.5417</span>
                        </div>
                    </div>

                    <div class="layui-col-xs2 layui-col-xs-offset1">
                        <button type="button" class="layui-btn layui-btn-danger zhangfubtn zhangfubtn-zheng"
                                th:class="${jiaoyi.zhangfu}<0?'layui-btn layui-btn-danger zhangfubtn':'layui-btn layui-btn-danger zhangfubtn zhangfubtn-zheng'"
                                th:text="${jiaoyi.getzhangfuvo()}">+2.5%
                        </button>
                    </div>
                </div>


                <div class="layui-row jiaoyi-end-tip">
                    没有更多数据了
                </div>


            </div>

        </div>
    </div>
</div>

<div class="layui-fluid" th:fragment="footer">
    <div class="layui-row footer-tabber">

        <ul>
            <li class="layui-col-xs2 f-btn" addr="/index">
                <i th:class="${active}=='1'?'li-top fa fa-home f-active':'li-top fa fa-home'"></i>
                <div th:class="${active}=='1'?'li-down f-active':'li-down'">首页</div>
            </li>
            <li class="layui-col-xs2 f-btn" addr="/jiaoyi">
                <i th:class="${active}=='2'?'li-top fa fa-rmb f-active':'li-top fa fa-rmb'"></i>
                <div th:class="${active}=='2'?'li-down f-active':'li-down'">交易</div>
            </li>
            <li class="layui-col-xs2 f-btn" addr="/log">
                <i th:class="${active}=='3'?'li-top fa fa-book f-active':'li-top fa fa-book'"></i>
                <div th:class="${active}=='3'?'li-down f-active':'li-down'">日志</div>
            </li>
            <li class="layui-col-xs2 f-btn" addr="/zixun">
                <i th:class="${active}=='4'?'li-top fa fa-bars f-active':'li-top fa fa-bars'"></i>
                <div th:class="${active}=='4'?'li-down f-active':'li-down'">资讯</div>
            </li>
            <li class="layui-col-xs2 f-btn" addr="/person">
                <i th:class="${active}=='5'?'li-top fa fa-user f-active':'li-top fa fa-user'"></i>
                <div th:class="${active}=='5'?'li-down f-active':'li-down'">我的</div>
            </li>
        </ul>
        <script>

            $(".f-btn").click(function () {
                $(".li-top").removeClass("f-active");
                $(".li-down").removeClass("f-active");

                $(this).children(".li-top").addClass("f-active");
                $(this).children(".li-down").addClass("f-active");
                var addr = $(this).attr("addr");
                window.location = addr;
            });

        </script>
    </div>

</div>
    <script type="text/javascript">


        //轮播
        layui.use(['carousel', 'form'], function () {
            var carousel = layui.carousel
                , form = layui.form;

            //图片轮播
            carousel.render({
                elem: '#test1'
                , width: '100%'
                , arrow: 'always' //始终显示箭头
                , height: '420px'
                , interval: 3000
            });

        });
        //选项卡
        layui.use('element', function () {
            var $ = layui.jquery
                , element = layui.element; //Tab的切换功能，切换事件监听等，需要依赖element模块
        });


        function openBolg() {
            window.location = "/blogContent?cid=122";
        }

        function openpersoninfo() {
            window.location = "/personinfo";
        }

        function toJiaoyiPage(jiaoyiid) {
            window.location = "/jiaoyi/detail?id="+jiaoyiid;
        }

        function openezhangdan() {
            window.location = "/ezhangdan";
        }

    </script>


</body>
</html>